﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HsTec.DigitalPlatform.DataAccess;

namespace HsTec.DigitalPlatform.Business
{
    public class ItemInfoManager
    {
        ItemInfoRepository iteminforepository = new ItemInfoRepository();

        public void Add(ItemInfo iteminfo)
        {
            iteminforepository.Add(iteminfo);
        }

        public void Delete(ItemInfo iteminfo)
        {
            iteminforepository.Delete(iteminfo);
        }

        public void Save()
        {
            iteminforepository.Save();
        }

        public ItemInfo GetItemInfoByID(int id)
        {
            return iteminforepository.GetItemInfoByID(id);
        }

        public IQueryable<ItemInfo> FindALLItemInfo()
        {
            return iteminforepository.FindALLItemInfo();
        }

        public IQueryable<ItemInfo> PageInfo(int page, int rp, string sortname, string sortorder)
        {
            return iteminforepository.PageInfo(page, rp, sortname, sortorder);
        }

        public int GetAllCount()
        {
            return iteminforepository.GetAllCount();
        }

        public IQueryable FindItemInfoByType(string itemtype, string sex)
        {
            return iteminforepository.FindItemInfoByType(itemtype, sex);
        }
    }
}
